package com.eis.persist.dao;

import java.util.List;

import com.eis.admin.mvc.bean.BizGroupBean;
import com.eis.persist.model.user.PersistBizGroup;
import com.eis.persist.model.user.PersistBizGroupFunction;
import com.eis.persist.model.user.PersistFunctionFilterRule;
import com.eis.persist.model.user.PersistSysGroup;
import com.eis.persist.model.user.PersistUser;

public interface UserDAO {
	public boolean userLogon(String userName, String password);
	
	public PersistUser getUserWithConfig(String userName);
	
	public boolean createUser(PersistUser persistUser);
	
	public boolean updateUser(PersistUser persistUser);
	
	public List<PersistSysGroup> getSysGroups();
	
	public List<PersistBizGroup> getBizGroups();
	
	public List<PersistUser> getUserForList(PersistUser filter, int pageCount, int pageRows);
	
	public boolean deleteUserById(int userId);
	
	public PersistUser getUserForEdit(int userId);
	
	public List<BizGroupBean> getBizGroupForList(BizGroupBean filter, int userGroup);
	
	public List<BizGroupBean> getAllBizGroups();
	
	public PersistBizGroup getBizGroupById(int bizGroupId);
	
	public boolean createBizGroup(BizGroupBean bizGroup);
	
	public PersistFunctionFilterRule loadFunctionFilterRule(int bizGroupId, String functionId);
	public List<PersistFunctionFilterRule> loadParentFilterRule(int bizGroupId, String functionId, int userBizGroupId);
	
	public boolean updateFilterRule(int bizGroupId, String functionId, String ruleXml, int maxRuleId);
	
	public List<PersistBizGroupFunction> getBizGroupFunctions(PersistBizGroup persistBizGroup);
}
